import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/Login',
    component: () => import('@/views/Login.vue')
}, {
    path: '/Admin',
    component: () => import('@/views/Admin.vue')
}, {
    path: '/Featured',
    component: () => import('@/views/Featured.vue')
},
{
    path: '/Apps',
    component: () => import('@/views/Apps.vue')
},
{
    path: '/Top',
    component: () => import('@/views/Top.vue')
},
{
    name: 'More',
    path: '/more/:title',
    component: () => import('@/views/More.vue')
},
{
    name: 'Search',
    path: '/search/:content',
    component: () => import('@/views/Search.vue')
},
{
    name: 'AppDetail',
    path: '/app/:id',
    component: () => import('@/views/AppDetail.vue')
}, {
    path: ':pathMatch(.*)',
    redirect: '/Featured'
}]
const router = new VueRouter({
    mode: 'history',
    routes
})

export default router